
<div class="detail-wrap"  th:object="${order}">
    <div style="display:none;" th:fragment="title" th:inline="text">[[#{pageTitle.orderDetail}]] - [[#{pageTitle.title}]]</div>
	<div class="crumbs">
		<span>我的帐户</span>
		<s class="crumbs-tier"></s>
		<span><a th:href="@{/account/orders}">订单管理</a></span>
		<s class="crumbs-tier"></s>
		<span>订单：<b th:text="*{orderNumber}">123456789</b></span>
	</div>
	<div class="tit-pannel clearfix">
		<h2 class="od-tit">订单详情：</h2>
		<div class="od-manage">
			<span th:inline="text">[[#{orderDetail.total}]]<strong blc:fsprice="*{total}">￥686</strong></span>
			<span th:if="*{status.type=='SUBMITTED' and (internalStatus!=null and (internalStatus.type=='PAYMENT_SUBMITTED' or internalStatus.type=='PAYMENT_FAIL'))}" class="accout-pay">
				<form blc:fs_payment_gateway_action="${paymentRequestDTO}" order_repay="${order}" complete_checkout="${true}" METHOD="POST" target="_blank" class="repay">
				    <input type="hidden" name="order_id" th:value="*{id}" />
					<input type="hidden" name="order_amount" th:value="*{total}" />
					<input type="hidden" name="item_title" th:value="#{cart.itemTitle}" />
					<input type="hidden" name="item_desc" th:value="#{cart.itemDesc}" />
					<input type="submit" id="rePay" class="medium red" th:value="#{order.payAgain}" />
				</form>
			</span>
			<!-- <a href="javascript:;" class="od-cancel">取消订单</a> -->
		</div>
	</div>
	<div class="od-pannel">
		<div class="obox">
			<ul class="order-info">
				<li class="ot">订单号：<span th:text="*{orderNumber}"></span></li>
				<li>下单时间：<span th:text="*{#dates.format(submitDate, 'MM-dd-yyyy')}">2015.2.13</span></li>
				<li>运费：<span>￥ 0.00</span></li>
				<li>税费：<span blc:fsprice="*{totalTax}">￥0</span></li>
				<li th:inline="text">[[#{orderDetail.total}]]<span blc:fsprice="*{total}">￥1</span></li>
			</ul>
		</div>
		<div class="pay-info obox">
			<h2>支付信息：</h2>
			<ul class="order-info"  th:each="payment : ${order.payments}" th:object="${payment}" th:inline="text">
				<li th:if="${payment.active}"><span th:text="#{*{type.Type}}"></span>：<b blc:fsprice="*{amount}" /></li>
				<li th:if="${payment.initialTransaction != null}">
					<span th:if="!*{#strings.isEmpty(initialTransaction.additionalFields['CARD_TYPE'])}">
						<b th:text="*{initialTransaction.additionalFields['CARD_TYPE']}" /> 
						****<span th:text="*{initialTransaction.additionalFields['LAST_FOUR']}" />
						<span th:text="#{confirmation.exp}">exp.</span>
						<span th:text="*{initialTransaction.additionalFields['EXP_DATE']}" />
					</span>
				</li>
				<li th:if="!*{#strings.isEmpty(initialTransaction.additionalFields['ACCOUNT_CREDIT_NUM'])}">
					<span th:text="#{confirmation.account}">卡号</span>
					<b th:text="*{initialTransaction.additionalFields['ACCOUNT_CREDIT_NUM']}" />
				</li>
				<li th:if="!*{#strings.isEmpty(initialTransaction.additionalFields['GIFT_CARD_NUM'])}"><span th:text="#{cart.giftCardNumber}">礼品卡号：</span><b th:text="*{initialTransaction.additionalFields['GIFT_CARD_NUM']}" /></li>
			</ul>
		</div>
		<div th:each="fulfillmentGroup, iterStat : *{fulfillmentGroups}" th:object="${fulfillmentGroup}" class="obox">
			<ul class="address-info">
				<li class="ot">收货信息：</li>
				<th:block th:if="*{address == null}">
				    <li>该订单没有物流信息</li>
				</th:block>
				<th:block th:unless="*{address == null}">
				    <li>收货人：<span th:text="*{address.firstName}">123</span></li>
				    <li th:if="*{address.phonePrimary != null}">联系方式：<span th:text="*{address.phonePrimary.phoneNumber}">12345678911</span></li>
				    <li>地址：<span th:text="*{address.state.name + ' ' + address.city + ' ' + address.addressLine1}">China</span></li>
				    <li>邮编：<span th:text="*{address.postalCode}">201201</span></li>
				</th:block>
			</ul>
			<ul class="address-info">
			    <li class="ot">物流信息：<span th:if="*{status}" th:text="' : ' + *{status}"></span></li>			    
			</ul>
		</div>
		<div class="goods-info tbl clearfix">
			<h2>商品清单：</h2>
			<div class="g-tbl clearfix">
				<ul class="goodstbl tbl-tit">
					<li class="tbc-tit g-img" th:text="#{cart.item}">Item</li>
					<li class="tbc-tit g-name">名称</li>
					<li class="tbc-tit" th:text="#{cart.quantity}">Quantity</li>
					<li class="tbc-tit" th:text="#{cart.price}">Price</li>
					<li class="tbc-tit" th:text="#{cart.totalSavings}">Total Savings</li>
					<li class="tbc-tit" th:text="#{cart.orderItemSubTotal}">Sub Total</li>
				</ul>
				<ul class="goodstbl tbl-cont"  th:each="orderItem : *{orderItems}" th:object="${orderItem}" >
					<li class="g-img"><img th:if="*{product.media['primary'] != null}"
			            th:src="@{*{product.media['primary']?.url} + '?thumbnail'}" width="60" th:alt="*{product.name}"
						    th:title="*{product.name}" /></li>
					<li class="g-name">
				    	<a th:href="@{*{product.url}}" th:text="*{name}"></a>
					    <span th:if="*{category.id==9950}" th:text="'抽奖号:'+*{orderItemAttributes.get('抽奖号')}" th:remove="tag"></span>
					    <span th:remove="tag">
						    <blc:product_option_display orderItem="${orderItem}" th:remove="tag">
			                   <ul th:unless="${#lists.isEmpty(productOptionDisplayValues)}" class="productOptions">
			                       <li th:each="entry: ${productOptionDisplayValues}">
			                           <span th:text="${entry.key} + ': ' + #{${entry.value}}"></span>
			                       </li>
			                   </ul>
		                	</blc:product_option_display>
	                	</span>
	                </li>
					<li th:text="*{quantity}">1</li>
					<li blc:fsprice="*{getPriceBeforeAdjustments(true).add(singleCalculatedShippmentFee)}">￥686.00</li>
					<li blc:fsprice="*{displayedDiscount}">￥ 0.00</li>
					<li blc:fsprice="*{totalPrice.add(calculatedShippmentFee)}">￥686000.00</li>
				</ul>
			</div>
			<div class="total">
				<p>运费：<span>￥ 0.00</span></p>
				<p th:unless="${order.orderAdjustmentsValue.zero}">优惠：
				    <span>-<span blc:fsprice="${order.orderAdjustmentsValue}" th:remove="tag">￥ 0.00</span></span>
				</p>
				<p class="t-all">
				    <span th:text="#{orderDetail.total}" th:remove="tag"></span><span blc:fsprice="${order.total}">￥60086.00</span>
				</p>
			</div>
		</div>
	</div>
</div>
